<?php 
	require_once '../function/db_conn.php';
	
	$country = $_GET['country'];
	
	$i = 0;
	
	$result = mysql_query('SELECT m.member_id, username, deal_credit, rating_credit, event_year, event_month, event_day 
		FROM member m, calendar_events c WHERE m.member_id = c.member_id AND event_desc = "' . $country . '" GROUP BY m.member_id
		ORDER BY event_year DESC, event_month DESC, event_day DESC');
	
	echo "<table id='tblTag'>";
	echo "<tr>";
	echo "<td>通知</td>";
	echo "<td>用戶名稱</td>";
	echo "<td>用戶評分</td>";
	echo "<td>出發日期</td>";
	echo "</tr>";
	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		echo "<tr>";
		echo "<td><input type='checkbox' name='tags[]' value='" . $row['member_id'] . "'/></td>";
		echo "<td>" . $row['username'] . "</td>";
		echo "<td>" . $row['deal_credit'] . "</td>";
		echo "<td>" . $row['event_year'] . "年" . $row['event_month'] . "月" . $row['event_day'] . "日" . "</td>";
		echo "</tr>";
	}
	echo "</table>";
?>